/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javaseapp - Reg1
 * <p>Powered by webrx On 2021-08-06 16:14:25
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class Reg8 {
    public static void main(String[] args) {
        String s = "abcd12ja郑vaC";
        //匹配 ^ 开头   $结尾
        String p = "^[a-z]+$"; //正则表达式 * 代表 ｛0,｝ 它前边符号出现的次数
        p = "[a-z]+";

        //判断是不是含有相关的符号 有没有数字
        p = ".*\\d.*";
        p = "^.*\\d.*$";

        //判断有没有汉字
        p = ".*[\u4e00-\u9fa5]+.*";

        //判断有没有大写的字母
        p = ".*[A-Z]+.*";

        //有没有字母大小写都可以
        p = ".*[a-zA-Z]+.*";
        System.out.println(s.matches(p));

    }
}
